<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!-- HTML5文档头 -->
<!DOCTYPE html>
<!-- lang="zh-cn"，此网页基本是中文内容 -->
<html lang="zh-cn">

	<head>
		<meta charset="utf-8" />
		<meta name="description" content="" />
		<meta name="keywords" content="" />
		<!-- 使用最新的IE兼容模式渲染此网页 -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<!-- 在双核浏览器下，默认使用webkit内核，由360浏览器提出 -->
		<meta name="renderer" content="webkit">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<!--<link rel="shortcut icon" href=""/>-->
		<!-- 强大的CSS Reset库 -->
		<link href="http://cdn.bootcss.com/normalize/5.0.0/normalize.css" rel="stylesheet">
		<%@include file="/views/common/import.jspf"%>
		<!-- 让IE9以下的浏览器支持HTML5标签 -->
		<!--[if lt IE 9]>
        	<script src="http://cdn.bootcss.com/html5shiv/r29/html5.js"></script>
        	<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
	</head>

	<body>
		<%@include file="/views/common/header.jspf" %>
		<div class="banner" style="background:url(${ctx}/static/${blog.bgImage})">
			<h1 class="blogname">${blog.name}</h1>
			<p>${blog.description}</p>
		</div>
		<section class=" container content">
			<div class="col-md-8">
				<ul class="clearfix">
				<c:forEach items="${articlePage.list }" var="article">
					<li class="list clearfix">
						<div class="list-tit">
							<h4><a href="<%=request.getContextPath()%>/blog/getArticle?id=${article.id}">${article.title }</a></h4>
							<p>${fn:substring(article.content, 0, 20) }</p>
							<p class="item">
								<span class="glyphicon glyphicon-th-large"></span><span class="classify">分类:${article.categoryName }</span>
								<span class="glyphicon glyphicon-time"></span><span class="introduce-time">发布时间：${article.createTime }</span>
								<span class="glyphicon glyphicon-heart"></span><span class="read">阅读次数(<span class="read-more">${article.readTimes }</span>)</span>
							</p>
						</div>
					</li>
					</c:forEach>
					
				</ul>
			</div>
			<div class="col-md-4">
				<ul class="list-group">
				<li class="list-group-item active">阅读排行</li>
					<c:forEach items="${articleList}" var="article" varStatus="v">
						<li class="list-group-item">${v.count }、${fn:substring(article.title, 0, 10) }<span class="badge">${article.readTimes }</span></li>
					</c:forEach>
				</ul>
				<ul class="list-group">
					<li class="list-group-item active">文章分类</li>
					<li class="list-group-item"><a href="#">全部博文 </a><span class="badge">${sum} </span></li>
					<c:forEach items="${categoryList}" var="category" varStatus="v">
					<li class="list-group-item"><a href="#">${category.categoryName}</a><span class="badge">${category.categorySum} </span></li>
					</c:forEach>
				</ul>
			</div>

		</section>
	</body>

</html>